
#include "sys_inner.h"
#include "sys_display.h"

extern SysInner *gSysInner;

// ----- 外部方法 -----

void SysDisplay(Scene *scene)
{
    if (!scene)
        return;
    //取得屏幕缓冲区
    Image image = gSysInner->platDisplay->GetMap();
    //限制范围计算
    Rect rangeLimit = {0, 0, (int32_t)image.info.width, (int32_t)image.info.height};
    //开画
    scene->OnDraw(&image, rangeLimit);
}

void SysDisplayClear(uint32_t color)
{
    ImageClear(gSysInner->platDisplay->GetMap(), color);
}

void SysDisplayRefresh()
{
    gSysInner->platDisplay->Refresh();
}
